package com.welike.shibo.mapper;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.welike.shibo.eneity.SysUserRole;
import org.apache.ibatis.annotations.Param;

/**
 * Created by fangyu on 2019/11/21.
 */
public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {

    /**
     * 添加用户和角色绑定关系
     * @param uid 用户id
     * @param rid 角色id
     * @return int
     */
    int addUserRole(@Param("uid") Integer uid, @Param("rid") Integer rid);

    int updateUserRole(JSONObject requestJson);

    int deleteByUid(JSONObject requestJson);
}